
#ifndef XML_CNG_LOADER_H
#define XML_CNG_LOADER_H

#include <vector>
#include <string>
#include <stdint.h>

namespace c2cplatform {
	namespace library {
		namespace xml {

class CXmlCfgLoader
{
public:
	CXmlCfgLoader(const std::string& sCfgXMLFile);

public:	
    int GetConfig(const std::string& sName, std::string& sValue);
    int GetConfig(const std::string& sName, uint32_t& dwValue);
	const char* GetLastErrMsg() const;

protected:	
    uint32_t HexStr2Int(const std::string& sHexStr); // "0x00a10000" --> 10551296L
    void LRTrim(std::string& sValue);
    bool IsDigit(const std::string& sDigit);
    void SpliteStrings(std::string& sStr, std::vector<std::string>& VecStrs);

protected:
	std::string m_sCfgXMLFile;
	std::string m_sLastErrMsg;
};

}
}
}

#endif /* XML_CNG_LOADER_H */

